import App from '../app'
import NoFound from '@/components/other/notFound';
import Login from '@/page/loginAndOffer';
import Index from '@/page/index';
import OfferPrice from '@/page/offerPrice';
import PriceList from '@/page/priceList';
import SelectCase from '@/page/selectCase';
import UnderWrite from '@/page/underWrite';
import Prepay from '@/page/prepay';

const basePath = '/';

const proPath = [
  {
    // 一级路由配置
    path: '/',
    component: App,
    // 相关子路由配置
    children: [
      // 二级路由为空重定向到指定页
      {
        path: `${basePath}`,
        redirect: `${basePath}login`
      },
      {
        path: `${basePath}index`,
        component: Index
      },
      {
        path: `${basePath}login`,
        component: Login
      },
      {
        path: `${basePath}offer`,
        component: OfferPrice
      },
      {
        path: `${basePath}pricelist`,
        component: PriceList
      },
      {
        path: `${basePath}selectcase`,
        component: SelectCase
      },
      {
        path: `${basePath}underwrite`,
        component: UnderWrite
      },
      {
        path: `${basePath}prepay`,
        component: Prepay
      }
    ]
  },
  // 无匹配路由重定向到404
  {
    path: '*',
    component: NoFound
  }
]

export default proPath
